package com.summer.data.parameter;

import java.sql.JDBCType;
import java.util.Arrays;
import java.util.stream.Stream;

/**
 * @author 345480567@qq.com
 */
public class ParameterStruct {

    public Object value;

    public JDBCType type;

    public ParameterStruct(Object value) {
        this.value = value;
    }

    public ParameterStruct(Object value, JDBCType jdbcType) {
        this.value = value;
        this.type = jdbcType;
    }

    public static ParameterStruct[] parameters(Object... values) {
        Stream<ParameterStruct> parameterStream = Arrays.stream(values).map(value -> new ParameterStruct(value));
        return parameterStream.toArray(ParameterStruct[]::new);
    }

    public static Parameter createClob() {
        return null;
    }
}
